<template>
    <div v-if='three'>
        <h3 class='textStyle'>样板合同</h3>
        <Tinymce :height='400' ref="editor" v-model='sampleContract'/>

        <div class='btn'>
            <el-button @click='submit' type="primary">提交</el-button>
            <el-button @click='reviousreviousSecond' type="text">上一步</el-button>
        </div>
    </div>
</template>


<script>
import Tinymce from '@/components/Tinymce'
export default {
    name:'threeTinymce',
    data(){
        return {
            three:false,
            sampleContract:''
        }
    },
    methods:{
        submit(){
            if(this.sampleContract === ''){
                this.$message.error('样本合同不能为空');
                return false;
            }
            this.$emit('sampleContractData',this.sampleContract);
        },
        reviousreviousSecond(){
            this.three = false;
            this.$emit('threeStatus',false);
        },
        openThreeStatus(){
            this.three = true;
        },
        closeThree(){
            this.three = false;
        }

    },
    components:{
        Tinymce
    }
}
</script>


<style lang="less" scoped>
.textStyle{
    margin: 0 0 0.7rem 0;
    font-weight: 400;
    font-size: .8rem;
}
.btn{
    margin: 2rem 0 0 0;
}

</style>
